#include <linux/platform_device.h>
#include <linux/leds.h>
#include <linux/err.h>

static struct gpio_led mxs_gpio_leds[] = {
	{
		.name         = "led-red",

        .gpio = MXS_PIN_TO_GPIO(MXS_PIN_ENCODE(1, 17)),
		.active_low   = 0,
	},
	{
		.name         = "led-ocid",

        .gpio = MXS_PIN_TO_GPIO(MXS_PIN_ENCODE(1, 16)),  // 这个IO和MX28EVK的以太网复位冲突，网卡工作需要输出低电平，TK100没有以太网
		.active_low   = 0,
	},
    {
		.name         = "led-pwr",

        .gpio = MXS_PIN_TO_GPIO(MXS_PIN_ENCODE(1, 18)),
		.active_low   = 0,
        .default_state =  LEDS_GPIO_DEFSTATE_ON,
	},
};




static struct gpio_led_platform_data mxs_gpio_led_data = {
	.leds         = mxs_gpio_leds,
	.num_leds     = ARRAY_SIZE(mxs_gpio_leds),
};




static struct platform_device mxs_leds_gpio_device= {
	.name  = "leds-gpio",
	.id    = -1,
	.dev = {
		.platform_data = &mxs_gpio_led_data,
	},
};
